<template>
  <div>
    <!-- <div class="pc" v-if="!mobile">
      <div class="text">{{ $t("微信号") }}：{{ this.contact?.wxNumber }}</div>
      <div class="img">
        <img :src="this.contact?.imageUrl" />
      </div>
    </div> -->
    <div class="mobile" style="padding-bottom: 30px">
      <div class="text">{{ $t("微信号") }}：{{ this.contact?.wxNumber }}</div>
      <div class="img">
        <img :src="this.contact?.imageUrl" />
      </div>
    </div>
  </div>
</template>

<script>
import apiService from "@/api/apiService";
import { isMobile, isWx } from "@/utils";
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "Contact",
  data() {
    return {
      contact: null,
    };
  },
  watch: {},
  mounted() {
    this.loadContact();
  },
  computed: {
    mobile() {
      return isMobile();
    },
    wx() {
      return isWx();
    },
  },
  methods: {
    loadContact() {
      apiService.get("/contact-info", {}).then((res) => {
        this.contact = res.data;
        console.log(this.contact);
      });
    },
  },
};
</script>

<style lang="scss" scoped>
.mobile {
  display: flex;
  flex-direction: column;
  align-items: center;
  .text {
    color: #333;
    font-size: 0.2rem;
    font-weight: bold;
    padding-top: 0.2rem;
  }
  .img {
    width: 1.8rem;
    height: 1.8rem;
    border: 1px solid red;
    border-radius: 12px;
    padding: 0.1rem;
    overflow: hidden;
    margin-top: 0.4rem;
    img {
      width: 100%;
      height: 100%;
    }
  }
}
</style>
